<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<form action="http://127.0.0.1" method="post">
    用户名:<input name="user">
    密码:<input nmae="pwd">
    <button>登录</button>
</form>
<hr>
<form action="http://127.0.0.1" method="post">
    用户名:<input name="user">
    密码:<input name="pwd">
    头像:<input name="file" type="file">
    <button>注册</button>
</form>
<hr>
<button onclick="get()">axios get</button>
<button onclick="post1()">axios post1</button>
<butotn onclick="post2()"axios post2></butotn>
<script>
    function get(){
        axios.get("http://127.0.0.1",{
            param : {
                user :"root",
                pwd : "123"
            }
        })
    }

    function post1(){
        let p = new URLSearchParams();
        p.append("user","root");
        p.append("pwd","123");
        axios.post("http:127.0.0.1",p)
    }

    function post2(){
        let param = {
            user : "root",
            pwd : "123"
        }
        axios.post("http://127.0.0.1",param)
    }
</script>
<body>

</body>
</html>